package cc.deng.wubo.minapp.beans.game;

import cc.deng.wubo.minapp.core.base.BaseModel;
import org.nutz.dao.DB;
import org.nutz.dao.entity.annotation.*;

@Table("user_idiom_log")
public class UserIdiomLog extends BaseModel {
    @Id
    @Prev({
            @SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(id),0)+1 FROM user_idiom_log"),
            @SQL(db= DB.ORACLE,value = "SELECT COALESCE(MAX(id),0)+1 FROM user_idiom_log")
    })
    @Column
    private Long id;
    @Column
    private Long userId;
    @Column
    private Long idiomId;

    @Column
    @Comment("0: 当前答题;1: 已经完成")
    private int state;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getIdiomId() {
        return idiomId;
    }

    public void setIdiomId(Long idiomId) {
        this.idiomId = idiomId;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }
}
